<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>主页</title>
<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="resource/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="resource/dist/css/bootstrap-responsive.min.css" />
<!-- 可选的Bootstrap主题文件（一般不用引入） -->
<link rel="stylesheet" href="resource/dist/css/bootstrap-theme.min.css">
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="resource/js/common/jquery-1.11.3.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="resource/dist/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="resource/css/common.css">
<link rel="stylesheet" href="resource/css/style.css">
<link rel="stylesheet" href="resource/css/font.css">
</head>
<body>
    <!--Header-part-start -->
    <div id="header">
      	<h1><a href="dashboard.html">管理系统平台</a></h1>
    	<div style="float: right;position: relative;">
      		<span style="float: right;">欢迎您，${user.userName}</span>
      		<span style="float: right;"><a href="">退出系统</a></span>
    	</div>
    </div>
    <!--Header-part-end--> 

    <!--sidebar-menu-start-->
    <div id="sidebar" style="OVERFLOW-Y: auto; OVERFLOW-X:hidden;">
        <ul>
            <li class="submenu active">
                <a class="menu_a" link="homePage.jsp"><i class="glyphicon glyphicon-home"></i> <span>系统首页</span></a> 
            </li>
            <li class="submenu"> 
            	<c:forEach var="menu" items="${menus}">
	                <a href="#">
	                    <i class="${menu.resourceIcon }"></i> 
	                    <span>${menu.resourceName }</span> 
	                    <span class="label label-important">${fn:length(menu.childrens) } </span>
	                </a>
	                <ul>
	                	<c:forEach var="children" items="${menu.childrens}">
	                    	<li><a class="menu_a" link="${children.resourceUrl }"><i class="${children.resourceIcon }"></i>${children.resourceName }</a></li>
	                	</c:forEach>
	                </ul>
                </c:forEach>
            </li>
        </ul>
    </div>
    <!--sidebar-menu-end-->

    <!--main-container-part-start-->
    <div id="content">
        <!--breadcrumbs-->
        <div id="content-header">
          <div id="breadcrumb"> <a href="index.html" title="Go to Home" class="tip-bottom"><i class="glyphicon glyphicon-home"></i> Home </a></div>
        </div>
        <!--breadcrumbs-->
        <iframe src="homePage.html" id="iframe-main" frameborder='0' style="width:100%;"></iframe>
    </div>
    <!--main-container-part-end-->

<!--     <script src="resource/js/common/excanvas.min.js"></script>  -->
<!--     <script src="js/jquery.ui.custom.js"></script>  -->
<!--     <script src="js/nicescroll/jquery.nicescroll.min.js"></script>  -->
<!--     <script src="resource/js/common/matrix.js"></script>  -->


    <script type="text/javascript">

    //初始化相关元素高度
    function init(){
        $("body").height($(window).height()-80);
        $("#iframe-main").height($(window).height()-90);
        $("#sidebar").height($(window).height()-50);
    }

    $(function(){
        init();
        $(window).resize(function(){
            init();
        });
    });

    function goPage (newURL) {
        if (newURL != "") {
            if (newURL == "-" ) {
                resetMenu();            
            }else {  
                document.location.href = newURL;
            }
        }
    }

    function resetMenu() {
        document.gomenu.selector.selectedIndex = 2;
    }
    </script>
</body>
</html>